home *** CD-ROM | disk | FTP | other *** search
/ Aminet 15 / Aminet 15 - Nov 1996.iso / Aminet / comm / mail / YamNet.lha / FSCode.lha / Rexx / Spot / UUEncode.spot < prev   
Text File  |  1994-03-24  |  1KB  |  47 lines

  1. /* UUEncode (written by Francois Helsen/Marc Duponcheel) */
  2. /* Install as 'UUEncode...' in the ARexx menu.           */
  3. /* $VER: UUEncode.spot 1.1 (16.3.94)                     */
  4. /* Added FSCode support by Marco Amadori                 */
  5.  
  6. address spot
  7. options results
  8.  
  9.  
  10. cmd.0    = 'C:UUIn'                   /* Full path to command UUEncode or similar */
  11. cmd.1    = 'C:FSCode'                 /* Full path to command FSCode */
  12.  
  13. opt.0    = ''
  14. opt.1    = 'ENCODE'
  15.  
  16. work     = 'T:'                       /* Work Path */
  17. source   = 'Mail:File'                /* Standard search path */
  18.  
  19. 'isarealist'
  20. if rc = 0 then do
  21.     'requestnotify "Use in message list or from message window!"'
  22.     exit
  23.     end
  24.  
  25. 'requestresponse TITLE "Encoder selection..." PROMPT "Which Encoder do you wanna use ?" GADGETS "_FSCode|_UUEncode" CENTER'
  26.  
  27. k = RC
  28.  
  29. 'requestfile TITLE "File to UU/FSEncode" PATH 'source
  30.  
  31. filename = result
  32.  
  33. if rc ~= 5 then do
  34.     filepart = fp(filename)
  35.     address command
  36.       cmd.k filename work'CodeFile' opt.k
  37.     address spot 'write FILE T:CodeFile'
  38.     'Delete >NIL: T:CodeFile'
  39.     end
  40.  
  41. exit /* done here ... */
  42.  
  43. /* given a filename, return the filepart */
  44. fp:
  45.  parse arg filename
  46.  return right(filename, length(filename) - max(lastpos("/", filename),lastpos(":", filename)))
  47.